import corejuliano.designpattern.mvc.*;
import corejuliano.gameelement.*;

import flash.geom.*;


class corejuliano.gameelement.TileableModel extends Model
{
	private var tile:Tile;
	private var zIndex:Number;
	
	public function TileableModel(id:String)
	{
		super(id);
	}
	
	public function addZIndex(zIndex:Number):Void
	{
		this.zIndex += zIndex;
	}

	public function getZIndex():Number
	{
		return zIndex;
	}

	public function setZIndex(zIndex:Number):Void
	{
		this.zIndex = zIndex;
	}

	public function getTile():Tile
	{
		return tile;
	}

	public function setTile(tile:Tile):Void
	{
		this.tile = tile;
	}
	
	public function destroy():Void
	{
		tile = null;;
		zIndex = null;
		super.destroy();		
	}
	
	public function toString(Void):String
	{
		return "corejuliano.gameelement.TileableModel";
	}
}